import { getAsyncPage } from '@/utils/asyncComponentLoader'

export default {
    path: 'system-management',
    name: 'SystemManagement',
    meta: {
        icon: 'system',
        title: '系统管理',
    },
    children: [{
        path: 'user-management',
        name: 'UserManagement',
        component: getAsyncPage(() => import('@/views/SystemManagement/UserManagement/index.vue')),
        meta: {
            title: '用户管理',
            permission: ['manage_user']
        }
    }, {
        path: 'block-management',
        name: 'BlockManagement',
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        redirect: { name: 'BlockList' },
        meta: {
            title: '统计标签管理',
        },
        children: [{
            path: 'area-management',
            name: 'AreaManagement',
            component: getAsyncPage(() => import('@/views/SystemManagement/BlockManagement/areaManagement/index.vue')),
            meta: {
                title: '区域管理',
                permission: ['manage_block']
            }
        }, {
            path: 'energyusers-management',
            name: 'EnergyUsersManagement',
            component: getAsyncPage(() => import('@/views/SystemManagement/BlockManagement/energyUsersManagement/index.vue')),
            meta: {
                title: '用能户管理',
                permission: ['manage_block']
            }
        }, {
            path: 'cell-management',
            name: 'CellManagement',
            component: getAsyncPage(() => import('@/views/SystemManagement/BlockManagement/cellManagement/index.vue')),
            meta: {
                title: '楼栋管理',
                permission: ['manage_block']
            }
        }, {
            path: 'category-management',
            name: 'CategoryManagement',
            component: getAsyncPage(() => import('@/views/SystemManagement/BlockManagement/categoryManagement/index.vue')),
            meta: {
                title: '用途管理',
                permission: ['manage_block']
            }
        }]
    }, {
        path: 'formula-management',
        name: 'FormulaManagement',
        component: getAsyncPage(() => import('@/views/SystemManagement/FormulaManagement/index.vue')),
        meta: {
            title: '公式管理',
            permission: ['manage_formula']
        }
    }, {
        //数据维护
        path: 'data-maintenance',
        name: 'DataMaintenance',
        component: getAsyncPage(() => import('@/views/SystemManagement/DataMaintenance/index.vue')),
        meta: {
            title: '数据维护',
            permission: ['data_maintenance']
        },
    }]
}